package hot100.链表;

/**
 * 链表节点类
 */
public class ListNode {
    public int val;
    public ListNode next;
    public ListNode(int x) {
        val = x;
        next = null;
    }
    public ListNode(int x, ListNode node) {
        val = x;
        next = node;
    }

    public static ListNode getTemplate1(){
        ListNode temp = new ListNode(1);
        temp.next = new ListNode(2);
        temp.next.next = new ListNode(3);
        temp.next.next.next = new ListNode(4);
        temp.next.next.next.next = new ListNode(5);
        return temp; //[1,9,1,2,4]
    }
}